package com.yuyou.fn.educational.service;

import com.github.wens.framework.service.ISuperService;
import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.educational.entity.Measurement;
import com.yuyou.fn.educational.vo.MeasurementQueryVo;
import com.yuyou.fn.educational.vo.MeasurementSaveOrUpdateVo;
import com.yuyou.fn.educational.vo.WhiltelistConfigVo;

import java.util.List;

/**
 *
 * Measurement 表数据服务层接口
 *
 */
public interface IMeasurementService extends ISuperService<Measurement,Long> {

    Measurement saveOrUpdate(MeasurementSaveOrUpdateVo measurementSaveOrUpdateVo);

    Measurement findMinLevelByStudentScore(MeasurementQueryVo measurementQueryVo,Double studentScore);


    Page<Measurement> findMeasurePageByQuery(MeasurementQueryVo measurementQueryVo,int pageNo,int pageSize);


    void updateWhiltelist(Long measurementId ,  WhiltelistConfigVo whiltelistConfig );

    boolean isInWhiltelist(Measurement measurement, Long studentId );


    void deleteMeasurement(List<Long> measurementIds);


    List<Measurement> findMeasureByPeriodIdFromCache(Long periodId);

    List<Measurement> findMeasureByPeriodId(Long periodId);

    boolean hasBindThisExamPaperId(Long examPaperId);

    List<Measurement> findReachMeasurementForScore(Long campusId, Long gradeId, Long subjectId, Integer score);

}